package com.alg.test;

/**
 * @author Li
 * @Date 2023/4/19 10:45
 */
public class BigDecimal {
    public static void main(String[] args) {
        /**
         * 进一发：BigDecimal.ROUND_UP
         * 去尾发: BigDecimal.ROUND_FLOOR
         * 四舍五入 BigDecimal.ROUND_HALF_UP
          */
        java.math.BigDecimal bd1 = new java.math.BigDecimal("1.0");
        java.math.BigDecimal bd2 = new java.math.BigDecimal("3.0");
        java.math.BigDecimal divide = bd1.divide(bd2,2, java.math.BigDecimal.ROUND_FLOOR);
        System.out.println(divide);
    }
}
